
cc.Class({
    extends: cc.Component,

    properties: {
        border:{
            default:null,
            type:cc.Node
        },

        spriteNode:{
            default:null,
            type:cc.Node
        }
    },
    _seatUserId : 0,

    setSeatUserId(userId){
        cc.log("设置ComparePoker的userId：",userId)
        this._seatUserId = userId
    },

    getSeatUserId(){
        return this._seatUserId
    },
    // LIFE-CYCLE CALLBACKS:

    // onLoad () {},

    start () {

    },

    // update (dt) {},

    startComparePokerBorderBlink:function () {
        var fadeIn = cc.fadeIn(0.4)
        var fadeOut = cc.fadeOut(0.4)
        let seq = cc.sequence(fadeIn,fadeOut)
        let repeat = cc.repeatForever(seq)

        this.border.opacity = 0
        this.border.active = true
        this.border.runAction(repeat)
    },

    stopComparePokerBorderBlink:function () {
        if(!this.border.active){
            return
        }

        this.border.active = false
        this.border.stopAllActions()
    },
});
